package com.bifan.txtreaderlib.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/*
 * 格式化
 */
public class FormatUtil {
    public static Boolean isDigital(char Char) {
        return Character.isDigit(Char);
    }

    public static Boolean isLetter(char Char) {
        return (Char >= 65 && Char <= 90) || (Char >= 97 && Char <= 122);
    }

    public static String FormatTime(Long time) {
        SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
        return dateFormat.format(new Date(time));
    }

    public static String FormatTime(Long time , String data) {
        SimpleDateFormat dateFormat = new SimpleDateFormat(data);
        return dateFormat.format(new Date(time));
    }
}
